{include file="public/top" /}
<div class="layui-container">
	<div class="layui-row layui-col-space15">
		<div class="layui-col-md8">
			<div class="fly-panel">
				{if condition='!input("")'}
				<div class="fly-panel-title fly-filter">
					<a>置顶</a>
					<a href="#signin" class="layui-hide-sm layui-show-xs-block fly-right" id="LAY_goSignin"
					   style="color: #FF5722;">去签到</a>
				</div>
				<ul class="fly-list">
					{volist name='is_top' id='row'}
					<li><a href="{:url('index/home_page/index',['user_id'=>$row.user_id])}" class="fly-avatar"> <img
							src="__STATIC__/{$row.face}" alt="pandaQ"/> </a>
						<h2><a class="layui-badge">{$row.cate_name}</a> <a
								href="{:url('index/Nom/index',['qid'=>$row.question_id])}">{$row.title}</a></h2>
						<div class="fly-list-info">
							<a href="{:url('index/home_page/index',['user_id'=>$row.user_id])}" link=""> <cite>{$row.nickname}</cite>
							</a>
							<span>{$row.create_time|date="Y/m/d H:s:i",###}</span>
							<span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i> {$row.kiss}</span>
							<span class="fly-list-nums"> <i class="iconfont icon-pinglun1" title="回答"></i> {$row.reply_num} </span>
						</div>
						{if condition='$row.is_good==1'}
						<div class="fly-list-badge">
							<span class="layui-badge layui-bg-red">精贴</span>
						</div>
						{else/}
						<div class="fly-list-badge layui-hide">
							<span class="layui-badge layui-bg-red">精贴</span>
						</div>
						{/if}
					</li>
					{/volist}
				</ul>
				{/if}
			</div>
			<div class="fly-panel" style="margin-bottom: 0;">
				<div class="fly-panel-title fly-filter">
					<a href="{:url('index/index/index')}" class="{:input('type')?'' :'layui-this'}">综合</a>
					<span class="fly-mid"></span>
					<a href="{:url('index/index/index',['cate_id'=>input('cate_id') ? input('cate_id') : '','type'=>1])}" class="{:input('type')==1?'layui-this' :''}">未结</a>
					<span class="fly-mid"></span>
					<a href="{:url('index/index/index',['cate_id'=>input('cate_id') ? input('cate_id') : '','type'=>2])}" class="{:input('type')==2?'layui-this' :''}">已结</a>
					<span class="fly-mid"></span>
					<a href="{:url('index/index/index',['cate_id'=>input('cate_id') ? input('cate_id') : '','type'=>3])}" class="{:input('type')==3?'layui-this' :''}">精华</a>
				</div>
				<ul class="fly-list">
					{volist name='post' id='row'}
					<li><a href="{:url('index/home_page/index',['user_id'=>$row.user_id])}" class="fly-avatar"> <img
							src="__STATIC__/{$row.face}" alt="{$row.nickname}"/> </a>
						<h2><a class="layui-badge">{$row.cate_name}</a> <a
								href="{:url('index/Nom/index',['qid'=>$row.question_id])}">{$row.title}</a></h2>
						<div class="fly-list-info">
							<a href="{:url('index/home_page/index',['user_id'=>$row.user_id])}" link=""> <cite>{$row.nickname}</cite>
							</a>
							<span>{$row.create_time|date="Y/m/d H:s:i",###}</span>
							<span class="fly-list-kiss layui-hide-xs" title="悬赏飞吻"><i class="iconfont icon-kiss"></i> {$row.kiss}</span>
							{if condition='$row.status==1'}
							<span class="layui-badge fly-badge-accept layui-hide-xs">已结</span>
							{else/}
							<span class="layui-badge fly-badge-accept layui-hide-xs layui-hide">已结</span>
							{/if}
							<span class="fly-list-nums"> <i class="iconfont icon-pinglun1" title="回答"></i> {$row.reply_num} </span>
						</div>
						{if condition='$row.is_good==1'}
						<div class="fly-list-badge">
							<span class="layui-badge layui-bg-red">精贴</span>
						</div>
						{else/}
						<div class="fly-list-badge layui-hide">
							<span class="layui-badge layui-bg-red">精贴</span>
						</div>
						{/if}
					</li>
					{/volist}
				</ul>
				<div style="text-align: center">
					<div class="laypage-main">
						{$post->render()}
					</div>
				</div>
			</div>
		</div>
		<div class="layui-col-md4">
			<div class="fly-panel">
				<h3 class="fly-panel-title">温馨通道</h3>
				<div class="layui-row fly-panel-main" style="padding: 15px;">
					<div class="layui-clear fly-list-quick">
						<div class="layui-col-xs6">
							<div>
								<a href="https://fly.layui.com/extend" target="_blank"> 组件平台 </a>
							</div>
						</div>
						<div class="layui-col-xs6">
							<div>
								<a href="http://fly.layui.com/case/2018/" target="_blank"> 年度案例 </a>
							</div>
						</div>
						<div class="layui-col-xs6">
							<div>
								<a href="http://fly.layui.com/jie/30227/" target="_blank"> 精贴集锦 </a>
							</div>
						</div>
						<div class="layui-col-xs6">
							<div>
								<a href="http://fly.layui.com/jie/4281/" target="_blank"> Git 仓库 </a>
							</div>
						</div>
						<div class="layui-col-xs6">
							<div>
								<a href="http://fly.layui.com/jie/13435/" target="_blank"> 关于飞吻 </a>
							</div>
						</div>
						<div class="layui-col-xs6">
							<div>
								<a href="http://www.layui.com/template/fly/" target="_blank"> Fly 社区模板 </a>
							</div>
						</div>
						<a name="signin"> </a>
					</div>
				</div>
			</div>
			<div class="fly-panel fly-signin fly-panel-border">
				<div class="fly-panel-title">
					签到
					<i class="fly-mid"></i>
					<a href="javascript:;" class="fly-link" id="LAY_signinHelp">说明</a>
					<i class="fly-mid"></i>
					<a href="javascript:;" class="fly-link" id="LAY_signinTop">活跃榜<span
							class="layui-badge-dot"></span></a>
					<span class="fly-signin-days">已连续签到<cite>{:$sign.sign_num ? $sign.sign_num : 0}</cite>天</span>
				</div>
				<div class="fly-panel-main fly-signin-main">
					{if condition='isset($time)'}
					<button class="layui-btn layui-btn-disabled">今日已签到</button>
					{else /}
					<span id="sign"><button class="layui-btn layui-btn-danger" id="LAY_signin">今日签到</button></span>
					{/if}
					<span>可获得<cite>20</cite>飞吻</span></div>
			</div>
			<div class="fly-panel">
				<div class="fly-panel-title">
					钻级赞助商
					<span class="fly-mid"></span>
					<a href="/jie/15697/" class="fly-link fly-joinad    ">我要加入</a>
				</div>
				<div class="fly-panel-main" style="padding: 13px 15px;">
					<a href="https://www.larryms.com/cates/5.html" target="_blank" rel="nofollow" class="fly-zanzhu"
					   style="background-color: #64BF98;" time-limit="2018-11-06 0:0:0"> 60秒极速上手，layui案例排名NO1后台框架 </a>
					<a href="https://yunzhuji.shop/url/?t=s11t&amp;utm_source=fly" target="_blank" rel="nofollow"
					   class="fly-zanzhu" style="background-color: #FF0000;" time-limit="2018-11-05 0:0:0">
						阿里云双11拼团低至99元，瓜分百万红包 </a>
				</div>
			</div>
			<div class="fly-panel fly-rank fly-rank-reply" id="LAY_replyRank">
				<h3 class="fly-panel-title">回贴周榜</h3>
				<dl>
					{volist name='reply ' id = 'row'}
					<dd>
						<a href="{:url('index/HomePage/index',['user_id'=>$row.user_id])}"><img
							src="__STATIC__/{$row.face}"><cite>{$row.nickname}</cite><i>{$row.cn}次回答</i></a>
					</dd>
					{/volist}
				</dl>
			</div>
			<dl class="fly-panel fly-list-one">
				<dt class="fly-panel-title">
					本周热议
				</dt>
				{volist name='week_hot' id ='row'}
				<dd>
					<a href="{:url('index/Nom/index',['qid'=>$row.question_id])}">{$row.title}</a>
					<span><i class="iconfont icon-pinglun1"></i> {$row.reply_num}</span>
				</dd>
				{/volist}
			</dl>
			<div class="fly-panel">
				<div class="fly-panel-title">
					官方产品
				</div>
				<div class="fly-panel-main">
					<a href="http://www.layui.com/admin/?from=fly" target="_blank" class="fly-zanzhu"
					   time-limit="2017.09.25-2099.01.01"
					   style="background-color: #20222A; background-image: linear-gradient(to right,#20222A,#3E4251);">layuiAdmin
						- layui 官方后台管理模板</a>
					<a href="http://layim.layui.com/?from=fly" target="_blank" class="fly-zanzhu"
					   time-limit="2017.09.25-2099.01.01"
					   style="background-color: #009688; background-image: linear-gradient(to right,#009688,#5FB878);">LayIM
						- layui 即时通讯旗舰之作</a>
				</div>
			</div>
			<div class="fly-panel" style="padding: 20px 0; text-align: center;">
				<img src="__STATIC__/index/layui/images/face/ewm.jpg" style="max-width: 100%;" alt="layui"/>
				<p style="position: relative; color: #666;">微信扫码关注 layui 公众号</p>
			</div>
			<div class="fly-panel fly-link">
				<h3 class="fly-panel-title">友情链接</h3>
				<dl class="fly-panel-main">
					<dd>
						<a href="http://layim.layui.com/" target="_blank">WebIM</a>
					</dd>
					<dd>
					</dd>
					<dd>
						<a href="http://layer.layui.com/" target="_blank">layer</a>
					</dd>
					<dd>
					</dd>
					<dd>
						<a href="http://www.layui.com/laydate/" target="_blank">layDate</a>
					</dd>
					<dd>
					</dd>
					<dd>
						<a href="http://www.bejson.com/" target="_blank">JSON在线工具</a>
					</dd>
					<dd>
					</dd>
					<dd>
						<a href="http://www.smeoa.com/" target="_blank">小微OA</a>
					</dd>
					<dd>
					</dd>
					<dd>
						<a href="http://www.fineui.com/" target="_blank">FineUI开源控件</a>
					</dd>
					<dd>
					</dd>
					<dd>
						<a href="https://www.hellojava.com/" target="_blank">Java菜鸟社区</a>
					</dd>
					<dd>
					</dd>
					<dd>
						<a href="https://juejin.im?from=layui" target="_blank">掘金开发者社区</a>
					</dd>
					<dd>
					</dd>
					<dd>
						<a href="http://www.jianliben.com/" target="_blank">简历模板</a>
					</dd>
					<dd>
					</dd>
					<dd>
						<a href="http://www.uileader.com/" target="_blank">TouchUI移动框架</a>
					</dd>
					<dd>
					</dd>
					<dd>
						<a href="javascript:;"
						   onclick="layer.alert('发送邮件至：xianxin@layui-inc.com&lt;br&gt; 邮件标题为：申请Fly社区友链', {title:'申请友链'});"
						   class="fly-link">申请友链</a>
					</dd>
					<dd>
					</dd>
				</dl>
			</div>
		</div>
	</div>
</div>
<script>
    layui.use('form', function () {
        var form = layui.form;
        $('#sign').click(function () {
            that = $(this)
            $.post("{:url('index/UserCenter/sign')}", {param1: 'value1'}, function (res, textStatus, xhr) {
                if (res.code == 0) {
                    layer.msg(res.msg, {icon: 9,time:1500}, function () {
                    });
                } else {
                    location.reload();
                    layer.msg(res.msg, {icon: 1}, function () {
                    });
                }
            });
        })
    });
</script>
